function y=funcs(z,tauk,taun,b,alpha,fgdp,igdp, phi ,nrate,delta )

thetaf=z(1);
thetai=z(2);
gamma=z(3);
%equation that matches the formal/informal labor ratio
y(1)=((phi*(delta/(-(alpha*thetaf*(tauk - 1))/(delta + 1/b - 1))^(1/(alpha - 1)) + (thetaf*(alpha*(tauk - 1) - (alpha - 1)*(taun - 1)))/(-(alpha*thetaf*(tauk - 1))/(delta + 1/b - 1))^(alpha/(alpha - 1)))*(-(delta + 1/b - 1)/(alpha*thetaf*(tauk - 1)))^(alpha/((alpha - 1)*(gamma - 1))))/((phi*thetai*((-(delta + 1/b - 1)/(alpha*thetaf*(tauk - 1)))^(alpha/((alpha - 1)*(gamma - 1)))/((gamma*thetai)/(thetaf*(alpha - 1)*(taun - 1)))^(1/(gamma - 1)))^gamma + gamma*thetai*((-(delta + 1/b - 1)/(alpha*thetaf*(tauk - 1)))^(alpha/((alpha - 1)*(gamma - 1)))/((gamma*thetai)/(thetaf*(alpha - 1)*(taun - 1)))^(1/(gamma - 1)) - 5280)*((-(delta + 1/b - 1)/(alpha*thetaf*(tauk - 1)))^(alpha/((alpha - 1)*(gamma - 1)))/((gamma*thetai)/(thetaf*(alpha - 1)*(taun - 1)))^(1/(gamma - 1)))^(gamma - 1))*((gamma*thetai)/(thetaf*(alpha - 1)*(taun - 1)))^(1/(gamma - 1))))- nrate;
%equation that matches the formal gdp
y(2)=(thetaf*((phi*thetai*((-(delta + 1/b - 1)/(alpha*thetaf*(tauk - 1)))^(alpha/((alpha - 1)*(gamma - 1)))/((gamma*thetai)/(thetaf*(alpha - 1)*(taun - 1)))^(1/(gamma - 1)))^gamma + gamma*thetai*((-(delta + 1/b - 1)/(alpha*thetaf*(tauk - 1)))^(alpha/((alpha - 1)*(gamma - 1)))/((gamma*thetai)/(thetaf*(alpha - 1)*(taun - 1)))^(1/(gamma - 1)) - 5280)*((-(delta + 1/b - 1)/(alpha*thetaf*(tauk - 1)))^(alpha/((alpha - 1)*(gamma - 1)))/((gamma*thetai)/(thetaf*(alpha - 1)*(taun - 1)))^(1/(gamma - 1)))^(gamma - 1))/(phi*(delta/(-(alpha*thetaf*(tauk - 1))/(delta + 1/b - 1))^(1/(alpha - 1)) + (thetaf*(alpha*(tauk - 1) - (alpha - 1)*(taun - 1)))/(-(alpha*thetaf*(tauk - 1))/(delta + 1/b - 1))^(alpha/(alpha - 1)))))^(1 - alpha)*((phi*thetai*((-(delta + 1/b - 1)/(alpha*thetaf*(tauk - 1)))^(alpha/((alpha - 1)*(gamma - 1)))/((gamma*thetai)/(thetaf*(alpha - 1)*(taun - 1)))^(1/(gamma - 1)))^gamma + gamma*thetai*((-(delta + 1/b - 1)/(alpha*thetaf*(tauk - 1)))^(alpha/((alpha - 1)*(gamma - 1)))/((gamma*thetai)/(thetaf*(alpha - 1)*(taun - 1)))^(1/(gamma - 1)) - 5280)*((-(delta + 1/b - 1)/(alpha*thetaf*(tauk - 1)))^(alpha/((alpha - 1)*(gamma - 1)))/((gamma*thetai)/(thetaf*(alpha - 1)*(taun - 1)))^(1/(gamma - 1)))^(gamma - 1))/(phi*(delta/(-(alpha*thetaf*(tauk - 1))/(delta + 1/b - 1))^(1/(alpha - 1)) + (thetaf*(alpha*(tauk - 1) - (alpha - 1)*(taun - 1)))/(-(alpha*thetaf*(tauk - 1))/(delta + 1/b - 1))^(alpha/(alpha - 1)))*(-(alpha*thetaf*(tauk - 1))/(delta + 1/b - 1))^(1/(alpha - 1))))^alpha) - fgdp;
%equation that matches the informal gdp
y(3)=(thetai*((-(delta + 1/b - 1)/(alpha*thetaf*(tauk - 1)))^(alpha/((alpha - 1)*(gamma - 1)))/((gamma*thetai)/(thetaf*(alpha - 1)*(taun - 1)))^(1/(gamma - 1)))^gamma) - igdp;
 

 